admin: Use execlp() to look for systemctl as the shell would
authorPaul van Tilburg <paul.van.tilburg@leftclick.eu>
Wed, 21 Dec 2016 15:39:45 +0000 (15:39 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 23 Dec 2016 12:18:27 +0000 (12:18 +0000)
Closes: #637
Approved by: cgwalters

src/ostree/ot-admin-functions.c

index ed4dfdfbca7486f0ee8dcf522b11871e719815b9..7ba2207e45a6f169634106c5f8ad2c95a5828049 100644 (file)
@@ -164,7 +164,7 @@ ot_admin_execve_reboot (OstreeSysroot *sysroot, GError **error)
       
   if (g_file_equal (ostree_sysroot_get_path (sysroot), real_sysroot))
     {
-      if (execl ("systemctl", "systemctl", "reboot", NULL) < 0)
+      if (execlp ("systemctl", "systemctl", "reboot", NULL) < 0)
         {
           glnx_set_error_from_errno (error);
           return FALSE;